/* NOTICE
 
    Jim - the Java Image Manager, copyright (c) 2005 - 2007 Grant Gardner 
 
    Jim is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Jim is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
    In addition, as a special exception, you are permitted to link this code
    with the 3rd party libraries required to compile this file and to
    distribute a linked combination including them. You must obey the
    GNU General Public License in all respects for all of the code except for
    those 3rd party libraries that are licenced under terms incompatible with the
    GNU General Public License.  
 
 
 NOTICE */

/*
 * Created by dnoakes on 27-Nov-2002 10:10:47 using IntelliJ IDEA.
 */

package au.com.lastweekend.jim.io.exif.makernote.nikon;

import java.util.HashMap;
import java.util.Map;

import au.com.lastweekend.jim.io.metadata.Directory;

/**
 * 
 * 
 * 
 * @version $Id: NikonType2MakernoteDirectory.java,v 1.3 2006/02/20 12:21:11 ggardner Exp $
 * @author <a href="mailto:grant@lastweekend.com.au"> <Grant Gardner> </a>
 */
public class NikonType2MakernoteDirectory extends Directory {

    // TYPE2 is for E990, D1 and later
    public static final int TAG_NIKON_TYPE2_UNKNOWN_1 = 0x0001;
    public static final int TAG_NIKON_TYPE2_ISO_SETTING = 0x0002;
    public static final int TAG_NIKON_TYPE2_COLOR_MODE = 0x0003;
    public static final int TAG_NIKON_TYPE2_QUALITY = 0x0004;
    public static final int TAG_NIKON_TYPE2_WHITE_BALANCE = 0x0005;
    public static final int TAG_NIKON_TYPE2_IMAGE_SHARPENING = 0x0006;
    public static final int TAG_NIKON_TYPE2_FOCUS_MODE = 0x0007;
    public static final int TAG_NIKON_TYPE2_FLASH_SETTING = 0x0008;
    public static final int TAG_NIKON_TYPE2_UNKNOWN_2 = 0x000A;
    public static final int TAG_NIKON_TYPE2_ISO_SELECTION = 0x000F;
    public static final int TAG_NIKON_TYPE2_IMAGE_ADJUSTMENT = 0x0080;
    public static final int TAG_NIKON_TYPE2_ADAPTER = 0x0082;
    public static final int TAG_NIKON_TYPE2_MANUAL_FOCUS_DISTANCE = 0x0085;
    public static final int TAG_NIKON_TYPE2_DIGITAL_ZOOM = 0x0086;
    public static final int TAG_NIKON_TYPE2_AF_FOCUS_POSITION = 0x0088;
    public static final int TAG_NIKON_TYPE2_DATA_DUMP = 0x0010;

    protected static final HashMap<Integer, String> TAG_NAME_MAP = new HashMap<Integer, String>();

    static {
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_ADAPTER, "Adapter");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_AF_FOCUS_POSITION, "AF Focus Position");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_COLOR_MODE, "Color Mode");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_DATA_DUMP, "Data Dump");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_DIGITAL_ZOOM, "Digital Zoom");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_FLASH_SETTING, "Flash Setting");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_FOCUS_MODE, "Focus Mode");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_IMAGE_ADJUSTMENT, "Image Adjustment");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_IMAGE_SHARPENING, "Image Sharpening");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_ISO_SELECTION, "ISO Selection");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_ISO_SETTING, "ISO Setting");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_MANUAL_FOCUS_DISTANCE, "Focus Distance");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_QUALITY, "Quality");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_UNKNOWN_1, "Makernote Unknown 1");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_UNKNOWN_2, "Makernote Unknown 2");
        TAG_NAME_MAP.put(TAG_NIKON_TYPE2_WHITE_BALANCE, "White Balance");
    }

    public NikonType2MakernoteDirectory(Directory parent) {

        super(parent);
        this.setDescriptor(new NikonType2MakernoteDescriptor(this));
    }

    @Override
    public String getName() {

        return "Nikon(2)";
    }

    @Override
    protected Map<Integer, String> getTagNameMap() {

        return TAG_NAME_MAP;
    }
}